<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="format-detection" content="telephone=no" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0,  maximum-scale=1.0" />
		<meta name="format-detection" content="telephone=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style" />
		<link rel="stylesheet" type="text/css" href="${ctxStatic}/shop/css/public.css" />
		<link rel="stylesheet" type="text/css" href="${ctxStatic}/shop/css/mstyle.css" />
		<link rel="stylesheet" type="text/css" href="${ctxStatic}/shop/css/reset.css" />


	</head>

	<body class="bodybgs">
	<div class="top1 ">
			<div class="top2 ">
				 <a href="Javascript:history.go(-1) "><span class="top3 ">返回</span></a> 
			</div>
			<div class="top4 ">登录</div>
		</div>
		<div class="div_w "></div>

		<section class="form-group" id="inputObj1" >
			<div class="form-text-login noa" id="accounts_1">
				<label class="font-two">用户名：</label>
				<input type="text" name="username" id="username" class="form-text" placeholder="手机号/用户名">
			</div>
			<div class="form-text-login nob" id="pwd_1">
				<label class="font-two">密&#12288;码：</label>
				<input type="password" name="password" id="password" class="form-text" placeholder="请输入密码">
				<a href="javascript:void(0);" class="form-text-clear" id="txtPhoneB"><i class="r passbg" id="togglePassword"></i></a>
			</div>
			<div class="btn5" style="margin-top:12px">
				<input class="" id="SubmitLoginBtn" value="登&nbsp;&nbsp;录">
				<a href="registerList"><span style="float: left;font-size:13px;color:#ff5500;">注册新帐号</span></a>
				<span style="float: right;font-size:13px;color:#ff5500;">忘记密码?</span>
			</div>
		</section>
		</section>
		<script src="${ctxStatic}/shop/js/jquery-1.6.2.min.js"></script>
	</body>
	<script type="text/javascript">
		$("#SubmitLoginBtn").click(function (){
			if($("#username").val()==''){
				alert("请填写账号")
				/*console.log("请填写账号")*/
			}else if($("#password").val()==''){
				alert("请填写密码")
			} else {
				$.ajax({
					type:"post",
					url: "login",
					dataType: 'json',
					data:{password:$("#password").val(),username:$("#username").val()},
					cache: false,
					success: function (data) {
						if(data.status==2){
							alert(data.message);
						}else if (data.status==1){
							alert(data.message);
						} else{
							alert(data.message);
							window.location.href="personal";
						}
					}
				})
			}
		});
	</script>

</html>